﻿#region using statements

using Microsoft.Xna.Framework;

#endregion

namespace NGen.Managers.GameState
{
	/// <summary>
	/// 	Abstract class that all game states must inherit
	/// </summary>
	public abstract class GameState
	{
		#region properties

		/// <summary>
		/// 	Get the name of this state
		/// </summary>
		public virtual string StateName {
			get { return GetType().Name; }
		}

		#endregion

		#region abstract methods

		/// <summary>
		/// 	<para>_Initialize the GameStateObject</para>
		/// </summary>
		protected internal abstract void _Initialize();

		/// <summary>
		/// 	<para>Cleanup the GameStateObject</para>
		/// </summary>
		protected internal abstract void _Cleanup();

		/// <summary>
		/// 	<para>Called whenever the state is no longer the active state</para>
		/// </summary>
		protected internal abstract void _OnFocusLost();

		/// <summary>
		/// 	<para>Called whenever the state becomes the active state</para>
		/// </summary>
		protected internal abstract void _OnFocusGained();

		/// <summary>
		/// 	<para>Update the GameState for this frame</para>
		/// </summary>
		protected internal abstract void _Update(GameTime p_gameTime);

		/// <summary>
		/// 	<para>Draw the GameStateObject to the screen</para>
		/// </summary>
		protected internal abstract void _Draw(GameTime p_gameTime);

		/// <summary>
		/// 	Overridden to return the state name
		/// </summary>
		/// <returns>the name of this state</returns>
		public override string ToString() {
			return StateName;
		}

		#endregion
	}
}